<?php /* Smarty version 2.6.18, created on 2010-08-28 14:08:37
         compiled from admin/alumni/general/index.tpl */ ?>
<iframe width=174 height=189 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="<?php echo @APPLICATION_URL; ?>
library/javascript/calendar/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe>
<div id="id_content"></div>
<script type="text/javascript">
	var ajax_icon		 		= '<?php echo @AJAX_INDICATOR_ICON; ?>
';
	var xoad_handler = <?php echo $this->_tpl_vars['xoad_handler']; ?>
;	
	
	function updateIntake(p_objForm, p_intId)
	{
		idIntakeName = document.getElementById("intake_name_" + p_intId);
		idIntakeOrder = document.getElementById("intake_order_" + p_intId);
		if ( idIntakeName.value == "" )
		{
			alert("Please input intake name");
			idIntakeName.focus();
			return false;
		}
		
		callAJAX('xoad_handler', 'updateintake', $H({intake_id: p_intId, intake_name: idIntakeName.value, intake_order: idIntakeOrder.value}), updateIntake_callBack);
		disableHandleForm(document.getElementById("frmListIntake"), true);
	}
	var updateIntake_callBack = function updateIntake_callBack(results)
	{
		disableHandleForm(document.getElementById("frmListIntake"), false);
		if ( results == "SUCCESS" )
		{
			alert("Action successfully!");
		}
		else if ( results == "FAIL" )
		{
			alert("Action unsuccessfully!");
		}
	}
	
	
	function checkFrmAddIntake(p_objForm)
	{
		if ( p_objForm.intake_name.value == "" )
		{
			alert("Please input intake name");
			p_objForm.intake_name.focus();
			return false;
		}
		callAJAX('xoad_handler', 'addintake', $H({intake_name: p_objForm.intake_name.value, intake_order: p_objForm.intake_order.value}), checkFrmAddIntake_callBack);
		disableHandleForm(document.getElementById("frmAddIntake"), true);
		return false;
	}
	var checkFrmAddIntake_callBack = function checkFrmAddIntake_callBack(results)
	{
		if ( results == "SUCCESS" )
		{
			listIntake();
			alert("Action successfully!");
		}
		else if ( results == "FAIL" )
		{
			disableHandleForm(document.getElementById("frmAddIntake"), false);
			alert("Action unsuccessfully!");
		}
	}
	
	function listIntake()
	{
		callAJAX('xoad_handler', 'listintake', $H({id: 'id_content'}), listIntake_callBack);
	}
	var listIntake_callBack = function listIntake_callBack(results)
	{
		
	}
	
	function updateLocation(p_objForm, p_intId)
	{
		idLocation = document.getElementById("location_name_" + p_intId);
		if ( idLocation.value == "" )
		{
			alert("Please input location name");
			idLocation.focus();
			return false;
		}
		callAJAX('xoad_handler', 'updatelocation', $H({location_id: p_intId, location_name: idLocation.value}), updateLocation_callBack);
		disableHandleForm(document.getElementById("frmListLocation"), true);
	}
	var updateLocation_callBack = function updateLocation_callBack(results)
	{
		disableHandleForm(document.getElementById("frmListLocation"), false);
		if ( results == "SUCCESS" )
		{
			alert("Action successfully!");
		}
		else if ( results == "FAIL" )
		{
			alert("Action unsuccessfully!");
		}
	}
	
	function checkFrmAddLocation(p_objForm)
	{
		if ( p_objForm.location_name.value == "" )
		{
			alert("Please input location name");
			p_objForm.location_name.focus();
			return false;
		}
		callAJAX('xoad_handler', 'addlocation', $H({location_name: p_objForm.location_name.value}), checkFrmAddLocation_callBack);
		disableHandleForm(document.getElementById("frmAddLocation"), true);
		return false;
	}
	var checkFrmAddLocation_callBack = function checkFrmAddLocation_callBack(results)
	{
		if ( results == "SUCCESS" )
		{
			listLocation();
			alert("Action successfully!");
		}
		else if ( results == "FAIL" )
		{
			disableHandleForm(document.getElementById("frmAddLocation"), false);
			alert("Action unsuccessfully!");
		}
	}
	
	function listLocation()
	{
		callAJAX('xoad_handler', 'listlocation', $H({id: 'id_content'}), listLocation_callBack);
	}
	var listLocation_callBack = function listLocation_callBack(results){}
	
	function updateIndustry(p_objForm, p_intId)
	{
		idIndustry = document.getElementById("industry_name_" + p_intId);
		if ( idIndustry.value == "" )
		{
			alert("Please input industry name");
			idIndustry.focus();
			return false;
		}
		callAJAX('xoad_handler', 'updateindustry', $H({industry_id: p_intId, industry_name: idIndustry.value}), updateIndustry_callBack);
		disableHandleForm(document.getElementById("frmListIndustry"), true);
	}
	var updateIndustry_callBack = function updateIndustry_callBack(results)
	{
		disableHandleForm(document.getElementById("frmListIndustry"), false);
		if ( results == "SUCCESS" )
		{
			alert("Action successfully!");
		}
		else if ( results == "FAIL" )
		{
			alert("Action unsuccessfully!");
		}
	}
	
	function checkFrmAddIndustry(p_objForm)
	{
		if ( p_objForm.industry_name.value == "" )
		{
			alert("Please input industry name");
			p_objForm.industry_name.focus();
			return false;
		}
		callAJAX('xoad_handler', 'addindustry', $H({industry_name: p_objForm.industry_name.value}), checkFrmAddIndustry_callBack);
		disableHandleForm(document.getElementById("frmAddIndustry"), true);
		return false;
	}
	var checkFrmAddIndustry_callBack = function checkFrmAddIndustry_callBack(results)
	{
		if ( results == "SUCCESS" )
		{
			listIndustry();
			alert("Action successfully!");
		}
		else if ( results == "FAIL" )
		{
			disableHandleForm(document.getElementById("frmAddIndustry"), false);
			alert("Action unsuccessfully!");
		}
	}
	
	function listIndustry()
	{
		callAJAX('xoad_handler', 'listindustry', $H({id: 'id_content'}), listIndustry_callBack);
	}
	var listIndustry_callBack = function listIndustry_callBack(results){}
	
	function disableHandleForm(frm, flgDisable)
	{
		for (var n=0; n < frm.elements.length; n++) 
			frm.elements[n].disabled = flgDisable;
	}
	
</script>